// pages/Main/mainIndex/mainIndex.js
var businessLogic = require('../../../utils/NetWork/Model/MainbusinessLogic')
var WxParse = require('../../../utils/Component/wxParse/wxParse.js');
var common = require('../../../utils/common')
Page({

  /**
   * 页面的初始数据
   */
  data: {
    // con: "",
    orgid: "",
    userid: "",
    Content: [],
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let c = common.Getorgid();
    this.setData({
      orgid: c.orgid,
      userid: c.userid,
    });
    this.tk();

  },tk:function () {
    let params = { page: 1, num: 1000, orgid: this.data.orgid, userid: this.data.userid, searchField: "orgid", searchValue: this.data.orgid };
    businessLogic.QueryListInterface(params, (res) => {
      console.log(res);
      this.setData({
        Content: res
      });
      var articled = res.content;
      var that = this;
      WxParse.wxParse('articled', 'html', articled, that, 5);
    });
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})